<!DOCTYPE html>
<html class="x-admin-sm">
  <head>
    <meta charset="UTF-8" />
    <title>文章管理</title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta
      name="viewport"
      content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,user-scalable=no"
    />

    <link rel="stylesheet" href="./css/xadmin.css" />
    <link rel="stylesheet" href="./lib/layui/css/layui.css">
    <link rel="stylesheet" href="./css/lsc_article.css">
    <script src="./lib/layui/layui.all.js"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <!-- <div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">演示</a>
            <a>
              <cite>导航元素</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
               这是文章列表、修改、删除、增加
            </div>
        </div>  -->

    <!-- 卡片区域 -->
    <div class="layui-card">
      <div class="layui-card-header">文章分类</div>
      <div class="layui-card-body" id="mainCt">
        <!-- 筛选区域 -->
        <form class="layui-form" id="ipt-search">
          <div class="layui-form-item">
            <label class="layui-form-label d">标题</label>
            <div class="layui-input-block tl-left">
              <input
                type="text"
                name="catename"
                required
                lay-verify="required"
                placeholder="请输入标题"
                autocomplete="off"
                class="layui-input"
                id="title"
              />
            </div>
          </div>
          <div class="layui-form-item layui-inline">
            <label class="layui-form-label a">分类</label>
            <select name="cateid" id="cate_id">
              <!-- 定义下拉筛选 模板引擎 -->
              <script type="text/html" id="tpl-cate">
                <option value="">请选择</option>
                {{each data}}
                <option value="">{{$value.catename}}</option>
                {{/each}}
              </script>
            </select>
          </div>
          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label b">时间</label>
              <div class="layui-inline" id="test6">
                <div class="layui-input-inline">
                  <input
                    type="text"
                    autocomplete="off"
                    id="test-startDate-1"
                    class="layui-input"
                    placeholder="开始日期"
                    id="test1"
                  />
                </div>
                <div class="layui-form-mid">-</div>
                <div class="layui-input-inline">
                  <input
                    type="text"
                    autocomplete="off"
                    id="test-endDate-1"
                    class="layui-input"
                    placeholder="结束日期"
                    itemid="test2"
                  />
                </div>
              </div>
            </div>
          </div>
          <div class="layui-form-item">
            <div class="layui-input-block filterBtn">
              <button
                class="layui-btn layui-btn-normal"
                lay-submit
                lay-filter="formDemo"
              >
                <i class="layui-icon layui-icon-search" id="search"></i>搜索
              </button>
              <button type="reset" id="lsc-reset" class="layui-btn layui-btn-primary">
                <i class="layui-icon layui-icon-refresh"></i> 重置
              </button>
            </div>
          </div>
        </form>
        <!-- 新增按钮及导出按钮/ 收缩栏.. -->
        <div class="nav">
          <div class="layui-form-item">
            <div class="layui-input-block addBtn">
              <button
                class="layui-btn layui-btn-normal"
                lay-submit
                id="addClassify"
              >
                <i class="layui-icon layui-icon-add-1"></i>新增
              </button>
              <button type="reset" class="layui-btn layui-btn-primary">
                <i class="layui-icon layui-icon-download-circle" id="upload"></i
                >导出
              </button>
            </div>
          </div>
          <div class="navRight">
            <div class="circle"><i class="layui-icon layui-icon-up"></i></div>
            <div class="circle" onclick="location.reload()">
              <i class="layui-icon layui-icon-refresh"></i>
            </div>
            <div class="circle" id="lsc-chosen"><i class="layui-icon layui-icon-tabs"></i></div>
          </div>

          <!-- 复选框小盒子 -->
          <div class="lsc-chosenBox" style="z-index: 1; display:none;">
             <ul>
              <li>
                <label for="ID">
                  <input class="ipt" id="ID" type="checkbox"  lay-skin="primary" title="用户ID" checked="">ID
                </label>
                </li>
              <li>
                <label for="user-title">
                  <input class="ipt" id="user-title" type="checkbox"  lay-skin="primary" title="标题" checked="">标题
                </label>
                </li>
              <li>
                <label for="user-a">
                  <input class="ipt" id="user-a" type="checkbox"  lay-skin="primary" title="分类名" checked="">分类名
                </label>
                </li>
              <li>
                <label for="user-b">
                  <input class="ipt" id="user-b" type="checkbox"  lay-skin="primary" title="图片" checked="">图片
                </label>
                </li>
              <li>
                <label for="user-c">
                  <input class="ipt" id="user-c" type="checkbox"  lay-skin="primary" title="创建时间" checked="">创建时间
                </label>
                </li>
              <li>
                <label for="user-d">
                  <input class="ipt" id="user-d" type="checkbox"  lay-skin="primary" title="是否推荐" checked="">是否推荐
                </label>
                </li>
              <li>
                <label for="user-e">
                  <input class="ipt" id="user-e" type="checkbox"  lay-skin="primary" title="是否置顶" checked="">是否置顶
                </label>
                </li>
              <li>
                <label for="user-f">
                  <input class="ipt" id="user-f" type="checkbox"  lay-skin="primary" title="文章状态" checked="">文章状态
                </label>
                </li>
              <li>
                <label for="user-g">
                  <input class="ipt" id="user-g" type="checkbox"  lay-skin="primary" title="操作" checked="">操作
                </label>
                </li>
             </ul>
          </div>



        </div>
        <!-- 列表区域 -->
        <table class="layui-table">
          <colgroup>
            <col width="80" />
            <col width="150" />
            <col width="150" />
            <col width="150" />
            <col width="150" />
            <col width="150" />
            <col width="150" />
            <col width="150" />
            <col width="150" />
          </colgroup>
          <thead class="lsc-th">
            <tr>
              <th name="ID">ID</th>
              <th name="user-title">标题</th>
              <th name="user-a">分类名</th>
              <th name="user-b">图片</th>
              <th name="user-c">创建时间</th>
              <th name="user-d">是否推荐</th>
              <th name="user-e">是否置顶</th>
              <th name="user-f">文章状态</th>
              <th name="user-g">操作</th>
            </tr>
          </thead>
          <tbody class="lsc-td">
            <!-- <tr>
            <td>1</td>
            <td>dasd</td>
            <td>娱乐</td>
            <td>
              <div>
                <img src="http://124.223.14.236:8060/upload/images/20230205/1675588920839.jpg" style="width:120px">
              </div>
            </td>
            <td>12121121215</td>
            <td>
              <form class="layui-form" action="">
                <input type="checkbox" name="xxx" lay-skin="switch">
              </form>
            </td>
            <td>
              <form class="layui-form" action="">
                <input type="checkbox" name="xxx" lay-skin="switch">
              </form>
            </td>
            <td>
              <div class="layui-btn-container">
                <button type="button" class="layui-btn">按钮一</button> 
              </div>
            </td>
            <td>
              <button type="button" class="layui-btn layui-btn-xs colpile btnEdit"  data-id="${item.id}"><i class="layui-icon layui-icon-edit"></i></button>
                <button type="button" class="layui-btn layui-btn-danger layui-btn-xs btnDel" data-id="${item.id}"><i class="layui-icon layui-icon-delete"></i></button>
            </td>
          </tr> -->
          </tbody>
        </table>
        <!-- 分页器 -->
        <div id="page_box"></div>
      </div>
      <!-- 新增 -->
      <div class="layui-card-body" id="addArticle" style="display: none">
        <div class="layui-fluid">
          <div class="layui-row layui-col-space15">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
              <ul class="layui-tab-title">
                <li class="layui-this">基础信息</li>
              </ul>
              <div class="layui-tab-content">
                <div class="layui-tab-item e layui-show">
                  <form class="layui-form" action="" id="newartdicle">
                    <!-- 标题 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*标题</label>
                      <div class="layui-input-block">
                        <input
                          type="text"
                          name="title"
                          
                          autocomplete="off"
                          placeholder="请输入标题名称"
                          class="layui-input f"
                        />
                      </div>
                    </div>

                    <!-- 作者 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*作者</label>
                      <div class="layui-input-block">
                        <input
                          type="text"
                          name="author"
                          
                          autocomplete="off"
                          placeholder="请输入作者"
                          class="layui-input f"
                        />
                      </div>
                    </div>

                    <!-- 点击事件 文档中只有点击次数，没有阅读次数 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*点击次数</label>
                      <div class="layui-input-block">
                        <!-- 文档中没有给出具体的参数名称 -->
                        <input
                          type="text"
                          name="click"
                          
                          autocomplete="off"
                          placeholder="请输入点击次数"
                          class="layui-input f"
                        />
                      </div>
                    </div>

                    <!-- 文章分类 -->
                    <div class="layui-form-item layui-inline editArt">
                      <label class="layui-form-label">*分类</label>
                      <select name="cateid" id="cateName">
                        <!-- 定义下拉筛选 模板引擎 -->
                        <script
                          type="text/html"
                          id="tpl-cate"
                          
                        >
                          <option value="">请选择</option>
                          {{each data}}
                          <option value="{{$value.Id}}">
                            {{$value.catename}}
                          </option>
                          {{/each}}
                        </script>
                      </select>
                    </div>

                    <!-- 创建时间 -->
                    <div class="layui-form-item j">
                      <div class="layui-inline">
                        <label class="layui-form-label">*创建时间</label>
                        <div class="layui-input-inline">
                          <input
                            type="text"
                            name="create_date"
                            class="layui-input"
                            
                            id="test1"
                            placeholder="创建时间日期"
                          />
                        </div>
                      </div>
                    </div>

                    <!-- 收藏数量 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">收藏数量</label>
                      <div class="layui-input-block">
                        <input
                          type="text"
                          name="lovenum"
                          required
                          
                          placeholder="请输入收藏数量"
                          autocomplete="off"
                          class="layui-input"
                        />
                      </div>
                    </div>

                    <!-- 是否推荐 -->
                    <div class="layui-form-item j" pane="">
                      <label class="layui-form-label">*是否推荐</label>
                      <div class="layui-input-block">
                        <input
                          type="checkbox"
                          name="ishot"
                          lay-skin="primary"
                          value="1"
                          title="1"
                        />
                        <input
                          type="checkbox"
                          name="ishot"
                          lay-skin="primary"
                          value="0"
                          title="0"
                        />
                      </div>
                    </div>

                    <!-- 是否置顶 -->
                    <div class="layui-form-item j" pane="">
                      <label class="layui-form-label">*是否推荐</label>
                      <div class="layui-input-block">
                        <input
                          type="checkbox"
                          name="istop"
                          lay-skin="primary"
                          value="1"
                          title="1"
                        />
                        <input
                          type="checkbox"
                          name="istop"
                          lay-skin="primary"
                          value="0"
                          title="0"
                        />
                      </div>
                    </div>

                    <!-- 文章缩略图 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*文章缩略图</label>
                      <div class="layui-input-block">
                        <!-- 隐藏的上传按钮 -->
                        <input
                          type="file"
                          name="file"
                          id="coverFileUpdata"
                          accept="image/jpeg,image/png"
                          style="display: none"
                        />
                        <img
                          id="img-avatar-pic"
                          src="/images/1.jpg"
                          class="img-responsive"
                          alt="无法显示默认头像"
                          width="200px"
                        />
                        <!-- 页面显示的上传按钮 -->
                        <button
                          type="button"
                          class="layui-btn layui-btn-normal"
                          id="artBtnUploda"
                        >
                          点击上传
                        </button>
                      </div>
                    </div>

                    <!-- 文章标签 -->
                    <div class="layui-form-item" pane="">
                      <label class="layui-form-label">*文章标签</label>
                      <div class="layui-input-block">
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="写作"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="阅读"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="游戏"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="娱乐"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="美女"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="吃饭"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="睡觉"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="打老虎"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="天文"
                        />
                      </div>
                    </div>
                    <!-- seo -->
                    <div class="layui-form-item layui-form-text">
                      <label class="layui-form-label">*SEO关键字</label>
                      <div class="layui-input-block">
                        <textarea
                          name="keywords"
                          rows="3"
                          placeholder="请输入SEO关键字名称"
                          class="layui-textarea"
                          style="min-height: 33px; width: 800px; display: block"
                        ></textarea>
                      </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                      <label class="layui-form-label">*SEO描述</label>
                      <div class="layui-input-block">
                        <textarea
                          name="description"
                          rows="3"
                          placeholder="请输入SEO的描述名称"
                          class="layui-textarea"
                          style="min-height: 33px; width: 800px; display: block"
                        ></textarea>
                      </div>
                    </div>

                    <!-- 文章内容 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*文章内容</label>
                      <!-- 为富文本编辑器外部的容器设置高度 -->
                      <div class="layui-input-block" style="height: 400px">
                        <!-- 重要：将来这个 textarea 会被初始化为富文本编辑器 -->
                        <textarea name="content"></textarea>
                      </div>
                    </div>
                    <!-- 按钮 -->
                    <div class="layui-form-item btnMore">
                      <div class="layui-input-block">
                        <button
                          type="submit"
                          class="layui-btn"
                          lay-filter="formDemo"
                          id="issueBtn"
                        >
                          立即发布
                        </button>
                        <button
                          type="button"
                          class="layui-btn layui-btn-normal"
                        >
                          保存草稿
                        </button>
                        <button
                          type="button"
                          lay-submit
                          id="lsc-return"
                          class="layui-btn layui-btn-warm"
                        >
                          返回列表
                        </button>
                      </div>
                    </div>
                  </form>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 编辑 -->
      <div class="layui-card-body" id="editArticle" style="display: none">
        <div class="layui-fluid">
          <div class="layui-row layui-col-space15">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
              <ul class="layui-tab-title">
                <li class="layui-this">基础信息</li>
              </ul>
              <div class="layui-tab-content">
                <div class="layui-tab-item e layui-show">
                  <form
                    class="layui-form"
                    action=""
                    id="editFormUpdata"
                    lay-filter="form-edit"
                  >
                    <!-- 标题 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*标题</label>
                      <div class="layui-input-block">
                        <input
                          type="text"
                          name="title"
                          lay-verify="required"
                          autocomplete="off"
                          placeholder="请输入标题名称"
                          class="layui-input f"
                        />
                      </div>
                    </div>

                    <!-- 作者 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*作者</label>
                      <div class="layui-input-block">
                        <input
                          type="text"
                          name="author"
                          lay-verify="required"
                          autocomplete="off"
                          placeholder="请输入作者"
                          class="layui-input f"
                        />
                      </div>
                    </div>

                    <!-- 点击事件 文档中只有点击次数，没有阅读次数 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*点击次数</label>
                      <div class="layui-input-block">
                        <!-- 文档中没有给出具体的参数名称 -->
                        <input
                          type="text"
                          name="click"
                          lay-verify="required"
                          autocomplete="off"
                          placeholder="请输入点击次数"
                          class="layui-input f"
                        />
                      </div>
                    </div>

                    <!-- 文章分类 -->
                    <div class="layui-form-item layui-inline editArt">
                      <label class="layui-form-label">*分类</label>
                      <select id="editCateName" name="cateid">
                        <!-- 定义下拉筛选 模板引擎 -->
                      </select>
                    </div>

                    <!-- 创建时间 -->
                    <div class="layui-form-item j">
                      <div class="layui-inline">
                        <label class="layui-form-label">*创建时间</label>
                        <div class="layui-input-inline">
                          <input
                            type="text"
                            name="create_date"
                            class="layui-input"
                            lay-verify="required"
                            id="test2"
                            placeholder="创建时间日期"
                          />
                        </div>
                      </div>
                    </div>

                    <!-- 收藏数量 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">收藏数量</label>
                      <div class="layui-input-block">
                        <input
                          type="text"
                          name="lovenum"
                          lay-verify="required"
                          placeholder="请输入收藏数量"
                          autocomplete="off"
                          class="layui-input"
                          id="lovenum"
                        />
                      </div>
                    </div>

                    <!-- 是否推荐 -->
                    <div class="layui-form-item j" pane="">
                      <label class="layui-form-label">*是否推荐</label>
                      <div class="layui-input-block">
                        <input
                          type="checkbox"
                          name="ishot"
                          lay-skin="primary"
                          value="1"
                          title="1"
                          id="ipt1"
                        />
                        <input
                          type="checkbox"
                          name="ishot"
                          lay-skin="primary"
                          value="0"
                          title="0"
                          id="ipt2"
                        />
                      </div>
                    </div>

                    <!-- 是否置顶 -->
                    <div class="layui-form-item j" pane="">
                      <label class="layui-form-label">*是否推荐</label>
                      <div class="layui-input-block">
                        <input
                          type="checkbox"
                          name="istop"
                          lay-skin="primary"
                          value="1"
                          title="1"
                          id="ipt3"
                        />
                        <input
                          type="checkbox"
                          name="istop"
                          lay-skin="primary"
                          value="0"
                          title="0"
                          id="ipt4"
                        />
                      </div>
                    </div>

                    <!-- 文章缩略图 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*文章缩略图</label>
                      <div class="layui-input-block">
                        <!-- 隐藏的上传按钮 -->
                        <input
                          type="file"
                          name="file"
                          id="editFile"
                          accept="image/jpeg,image/png"
                          style="display: none"
                        />
                        <img
                          id="img-avatar-edit"
                          src="/images/1.jpg"
                          class="img-responsive"
                          alt="无法显示默认头像"
                          width="200px"
                        />
                        <!-- 页面显示的上传按钮 -->
                        <button
                          type="button"
                          class="layui-btn layui-btn-normal"
                          id="editBtnUpdata"
                        >
                          点击上传
                        </button>
                      </div>
                    </div>

                    <!-- 文章标签 -->
                    <div class="layui-form-item" pane="">
                      <label class="layui-form-label">*文章标签</label>
                      <div class="layui-input-block">
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="写作"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="阅读"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="游戏"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="娱乐"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="美女"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="吃饭"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="睡觉"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="打老虎"
                          class="tags"
                        />
                        <input
                          type="checkbox"
                          name="tags"
                          lay-skin="primary"
                          title="天文"
                          class="tags"
                        />
                      </div>
                    </div>
                    <!-- seo -->
                    <div class="layui-form-item layui-form-text">
                      <label class="layui-form-label">*SEO关键字</label>
                      <div class="layui-input-block">
                        <textarea
                          name="keywords"
                          rows="3"
                          placeholder="请输入SEO关键字名称"
                          class="layui-textarea"
                          style="min-height: 33px; width: 800px; display: block"
                          id="textarea1"
                        ></textarea>
                      </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                      <label class="layui-form-label">*SEO描述</label>
                      <div class="layui-input-block">
                        <textarea
                          name="description"
                          rows="3"
                          placeholder="请输入SEO的描述名称"
                          class="layui-textarea"
                          style="min-height: 33px; width: 800px; display: block"
                          id="textarea2"
                        ></textarea>
                      </div>
                    </div>

                    <!-- 文章内容 -->
                    <div class="layui-form-item">
                      <label class="layui-form-label">*文章内容</label>
                      <!-- 为富文本编辑器外部的容器设置高度 -->
                      <div class="layui-input-block" style="height: 400px">
                        <!-- 重要：将来这个 textarea 会被初始化为富文本编辑器 -->
                        <textarea name="content" id="content"></textarea>
                      </div>
                    </div>
                    <!-- 按钮 -->
                    <div class="layui-form-item btnMore">
                      <div class="layui-input-block">
                        <button
                          type="submit"
                          class="layui-btn"
                          lay-filter="formDemo"
                        >
                          立即发布
                        </button>
                        <button
                          type="button"
                          class="layui-btn layui-btn-normal"
                        >
                          保存草稿
                        </button>
                        <button class="layui-btn layui-btn-warm" id="returnBtn">
                          返回列表
                        </button>
                      </div>
                    </div>
                  </form>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>
  <script src="./lsc-tip/tinymce.min.js"></script>
  <script src="./lsc-tip/tinymce_setup.js"></script>
  <script src="./lsc-tip/template-web.js"></script>
  <script src="./js/jquery.min.js"></script>
  <script src="./js/lsc_article.js"></script>
</html>
